﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Blog.Core.Domain.Model.User
{
    /// <summary>
    /// 用户信息表
    /// </summary>
    [Table("UserInfo")]
    public class UserInfo: Audit
    {
        /// <summary>
        /// 主键编号
        /// </summary>
        [Key]
        public int Id { get; set; }
        /// <summary>
        /// 登录名
        /// </summary>
        [Required]
        [Display(Name =("登录名"))]
        public string Login { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required]
        [Display(Name =("密码"))]
        public string Pwd { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        [Required]
        [Display(Name =("昵称"))]
        public string UserName { get; set; }
        /// <summary>
        /// 电话号码
        /// </summary>
        [Display(Name =("电话号码"))]
        public string? Phone { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Display(Name =("邮箱"))]
        public string? Emali { get; set; }
        /// <summary>
        /// 失败次数
        /// </summary>
        [Display(Name = "失败次数")]
        public int LoseNum { get; set; } = 0;
        /// <summary>
        /// 锁定时间
        /// </summary>
        [Display(Name = "锁定时间")]
        public DateTime? LoseTime { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        [Display(Name =("头像"))]
        public string? UserImg { get; set; }
    }
}
